package com.infocollect.project.api.service.impl;



import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.infocollect.project.api.entity.NewContentEntity;
import com.infocollect.project.api.mapper.NewContentMapper;
import com.infocollect.project.api.service.INewContentService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 刘亚平
 * @since 2021-02-03
 */
@Service
public class NewContentServiceImpl extends ServiceImpl<NewContentMapper, NewContentEntity> implements INewContentService {
    /**
     * 通过主键获取数据
     *
     * @param fid 主键
     * @return 是否成功
     */
    @Override
    public  NewContentEntity getById(Long id){
        return    baseMapper.selectById(id);
    }
    /**
     * 通过主键删除数据
     *
     * @param fid 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(Long fid) {
        return this.baseMapper.deleteById(fid) > 0;
    }
}

